import request from '@/utils/request'

// 查询点餐列表
export function listOrderMaster(query) {
  return request({
    url: '/scancode/orderMaster/list',
    method: 'get',
    params: query
  })
}

// 查询点餐详细
export function getOrderMaster(id) {
  return request({
    url: '/scancode/orderMaster/getInfo/' + id,
    method: 'get'
  })
}

// 新增点餐
export function addOrderMaster(data) {
  return request({
    url: '/scancode/orderMaster',
    method: 'post',
    data: data
  })
}

// 修改点餐
export function updateOrderMaster(data) {
  return request({
    url: '/scancode/orderMaster/edit',
    method: 'post',
    data: data
  })
}

// 删除点餐
export function delOrderMaster(id) {
  return request({
    url: '/scancode/orderMaster/del/' + id,
    method: 'post'
  })
}

// 导出点餐
export function exportOrderMaster(query) {
  return request({
    url: '/scancode/orderMaster/export',
    method: 'get',
    params: query
  })
}

//查询订单细节
export function orderDetail(id) {
  return request({
    url: '/scancode/orderMaster/getInfo?id=' + id,
    method: 'get'
  })
}

//查询订单菜品图片
export function orderDetailimg(id) {
  return request({
    url: '/scancode/specifications/findFsByOdrId?orderId=' + id,
    method: 'get'
  })
}

//查询订单菜品数量
export function orderDetailNum(id) {
  return request({
    url: '/scancode/orderDetail/findByOrderId?orderId=' + id,
    method: 'get'
  })
}
